import time
import ubinascii
import gc
from microdot import Microdot, send_file,Request
import network


wifi = network.WLAN(network.STA_IF)    
wifi.active(True)   
wifi.connect("T11111us", "1222222") 
time.sleep(4)

Request.max_content_length = 1024 * 1024
Request.max_body_length = 1024 * 1024
app = Microdot()


@app.route('/')
async def index(request):
    return send_file('index.html')


@app.route('/update', methods=['GET', 'POST'])
async def static(request):
    gc.collect()
    if request.method == 'POST':
        print(request.form["img"])

app.run(debug=True)